Information can be added to and retrieved from a storage area or data buffer referred to as a “stack,” In the case of a Last In, First Out (LIFO) stack, values are retrieved (“popped”) in an order based on when each value was added (“pushed”) to the stack, with the most recently pushed value being the next value that will be popped. This type of stack can be thought of as a list of values in which newer values push down older values, and values are popped from the top of the list.
Such a stack could be implemented by storing each value in a Random Access Memory (RAM) unit and/or hardware registers. When a large number of values need to be stored in a stack, however, the amount of RAM and/or the number of hardware registers that would be required may be impractical.